import viaParent from './viaParent'

type HttpMethod = 'get' | 'post' | 'getFileData' | 'postFileData'
type RequestSignature = (
  url: string,
  data?: unknown,
  useRespMsgAsErrorToast?: boolean,
) => Promise<unknown>

export type Http = Record<HttpMethod, RequestSignature>

export default '__POWERED_BY_WUJIE__' in window ? viaParent() : null
